﻿//
// Created by francklinson on 2021/3/23.
//

#ifndef CPPPRIMERPLUSREADINGCODES_STONEWT_H
#define CPPPRIMERPLUSREADINGCODES_STONEWT_H


class StoneWt
{
private:
    enum {Lbs_per_stn = 14};      // pounds per stone
    int stone;                    // whole stones
    double pds_left;              // fractional pounds
    double pounds;                // entire weight in pounds
public:
    StoneWt(double lbs);          // constructor for double pounds
    StoneWt(int stn, double lbs); // constructor for stone, lbs
    StoneWt();                    // default constructor
    ~StoneWt();
    void show_lbs() const;        // show weight in pounds format
    void show_stn() const;        // show weight in stone format

    // conversion functions
    operator int() const;
    operator double() const;
};


#endif //CPPPRIMERPLUSREADINGCODES_STONEWT_H
